This is the source code from James Coplien's book.